package cn.fengzhilun.javase.day07;

import java.util.Arrays;

import org.junit.Test;

public class TestExtends {
	@Test
	public void Test() {
		int []array= {8,5,4,6,3};
		System.out.println(Arrays.binarySearch(array, 6));
		Arrays.sort(array);
		for(int i:array) {
			System.out.print(i);
			
		}
		System.out.println(Arrays.toString(array));
		 int [][]array2= {{1,2,3},{4,5,6}};
		 for(int i=0;i<array2.length;i++) {
			 for(int j=0;j<array2[0].length;j++) {
				 System.out.print(array2[i][j]);
			 }
			 System.out.println();
		 }
	}
	@Test
	public void test2() {
		Programmer p=new Programmer();
		p.coding();
		p.setName("码农");
		System.out.println(p.getName());
	}
	@Test
	public void test3() {
		Programmer p=new Programmer();
		p.setSalary(10000);
		
		Manager manager=new Manager();
		manager.setSalary(12000);
		manager.setBonus(5000);
		System.out.println(p.getSalary());
		System.out.println(manager.getSalary());
		
	}
	@Test
	public void test4() {
		Manager manager =new Manager();
		manager.setSalary(12000);
		manager.setBonus(5000);
		
	}
	@Test
	public void test5() {
		Programmer p=new Programmer();
		
		Employee e1= new Programmer();
		Employee e2=new Employee();
//		 e1.coding();
		
		
	}
	@Test
	public void test7() {
		Programmer p=new Programmer();
		p.setSalary(10000);
		
		Manager m=new Manager();
		m.setSalary(12000);
		m.setBonus(5000);
		
		Boss boss=new Boss();
		boss.pay(p);
		boss.pay(m);
	}
	@Test
	public void test10() {
		Employee p= new Programmer();
		((Programmer)(p)).coding();

		
	}
	@Test
	public void test11() {
		Employee e1=new Employee();
		Employee e2=new Employee();
		
		System.out.println(e1 instanceof Object);
		
		String s1=new String("abc");
		String s2=new String("abc");
		
		System.out.println(s1==s2);
		
		System.out.println();
	}
}
